
#ifndef _PYTHON_WIDGET_H__
#define _PYTHON_WIDGET_H__

#include <QToolBar>
#include <QMainWindow>
#include <QWidget>
#include <QMenu>
#include <QMenuBar>
#include <QDockWidget>
#include <QPlainTextEdit>
#include <QTextDocument>
#include <QFileDialog>

#include "../Logger/Logger.hpp"
#include "PyHighlighter.hpp"
#include "PyInterpreter.hpp"
#include "PyInterpreterAPI.hpp"




NAMESPACE_BEGIN(NSPythonWidget)

class COMPILERAPI PythonWidget : public QMainWindow {
	Q_OBJECT
	SIGNALDEC(PythonWidget, QMainWindow)
protected:
	void Initialize();
	void Finalize();

public:
	REGMENU(menu_file)
		/*QActions*/
	REGACTION(input_file)
	REGACTION(output_py)
	REGACTION(clear)
	REGACTION(run)
	REGACTION(close)

private:
	NSPyHighlighter::PyHighlighter* py_highlight;
	QPlainTextEdit* py_editor;
	QToolBar* py_toolbar;

signals:
	void runPythonSignal(QString _py);

public Q_SLOTS:
	void runPythonEvent();
	void openPythonFileEvent();
	void savePythonFileEvent();
	void clearPythonCodeEvent();


};

NAMESPACE_END

#endif //! _PYTHON_WIDGET_H__